package com.els.search.controller;

import com.els.search.service.TestFakeNewsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @title: IndexSearchController
 * @projectName fake-baidu
 * @Date: 2021/7/1 21:27
 * @Author: lei.yu-esint
 * @Description:
 */
@RestController
public class TestController {

    @Autowired(required = false)
    private TestFakeNewsService testFakeNewsService;
    /**
     * 新增新闻-ES
     * @return
     */
    @RequestMapping("/addEsNews")
    public void addNews(){
//        testFakeNewsService.careateIndex();//创建索引
        testFakeNewsService.addDocument();//创建文档
    }

}
